package com.cm.sys.framework.execption;

import com.cm.sys.framework.application.ApiResponseCode;

/***
 * 业务异常处理类
 * 
 * @author yxq18
 *
 */
public class BusinessException extends RuntimeException {

    /**
     * 
     */
    private static final long serialVersionUID = 1L;
    private int code = ApiResponseCode.OTHER.getCode();
    private String message;

    public BusinessException() {
        super();
    }

    public BusinessException(int code, String message) {
        super();
        this.code = code;
        this.message = message;
    }

    public BusinessException(String message, Throwable cause) {
        super(message, cause);
        this.message = message;

    }

    public BusinessException(String message) {
        super(message);
        this.message = message;

    }

    public BusinessException(Throwable cause) {
        super(cause);
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}
